package com.cema.manage.framework.web.page;


import com.cema.manage.common.Constants;
import com.cema.manage.common.utils.ServletUtils;

/**
 * 表格数据处理
 * 
 * @author reasahi
 */
public class TableSupport
{
    /**
     * 封装分页对象
     */
    public static PageDomain getPageDomain()
    {
        PageDomain pageDomain = new PageDomain();
        pageDomain.setPageNum(ServletUtils.getIntParameter(Constants.INSTANCE.getPAGENUM()));
        pageDomain.setPageSize(ServletUtils.getIntParameter(Constants.INSTANCE.getPAGESIZE()));
        pageDomain.setOrderByColumn(ServletUtils.getStrParameter(Constants.INSTANCE.getORDERBYCOLUMN()));
        pageDomain.setIsAsc(ServletUtils.getStrParameter(Constants.INSTANCE.getISASC()));
        return pageDomain;
    }

    public static PageDomain buildPageRequest()
    {
        return getPageDomain();
    }

}
